<?php

declare(strict_types=1);

namespace App\Request\Gift;

use App\Request\BaseCommonRequest;
use Hyperf\Validation\Request\FormRequest;

class SendGiftRequest extends BaseCommonRequest
{
    /**
     * Determine if the user is authorized to make this request.
     */
    public function authorize(): bool
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     */
    public function rules(): array
    {
        return [
            'user_id' => 'required|integer',// 收礼人
            'gid' => 'required|integer',// 礼物id
            'num' => 'required|integer|gt:0',// 送礼数量
            'is_backpack' => 'required|integer',// 是否为背包送礼
        ];
    }
}
